package {{package}};

{{#imports}}import {{import}};
{{/imports}}

{{#useAbstractionForFiles}}
import java.io.InputStream;
{{/useAbstractionForFiles}}
import java.util.List;
import java.util.Map;
import {{javaxPackage}}.ws.rs.*;
{{#useGenericResponse}}
import {{javaxPackage}}.ws.rs.core.Response;
{{/useGenericResponse}}
{{#addConsumesProducesJson}}
import {{javaxPackage}}.ws.rs.core.MediaType;
{{/addConsumesProducesJson}}
import org.apache.cxf.jaxrs.ext.multipart.*;

{{#swagger1AnnotationLibrary}}
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.ApiResponse;
import io.swagger.jaxrs.PATCH;
{{/swagger1AnnotationLibrary}}
{{#swagger2AnnotationLibrary}}
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.media.ArraySchema;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
{{/swagger2AnnotationLibrary}}
{{#useBeanValidation}}
import {{javaxPackage}}.validation.constraints.*;
import {{javaxPackage}}.validation.Valid;
{{/useBeanValidation}}

{{#appName}}
/**
 * {{{appName}}}
 *
 {{#appDescription}}
 * <p>{{{.}}}
 *
 {{/appDescription}}
 */
{{/appName}}
@Path("{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}{{commonPath}}")
{{#swagger1AnnotationLibrary}}
@Api(value = "/", description = "{{description}}")
{{/swagger1AnnotationLibrary}}
{{#swagger2AnnotationLibrary}}
@OpenAPIDefinition(
    info = @Info(
        {{#appName}}title = "{{{appName}}}",{{/appName}}
        {{#appDescription}}description = "{{{appDescription}}}",{{/appDescription}}
        version = "{{{appVersion}}}"
    )
)
{{/swagger2AnnotationLibrary}}
{{#addConsumesProducesJson}}
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
{{/addConsumesProducesJson}}
public interface {{classname}}  {
{{#operations}}
{{#operation}}

    {{#summary}}
    /**
     * {{summary}}
     *
     {{#notes}}
     * {{.}}
     *
     {{/notes}}
     */
    {{/summary}}
    @{{httpMethod}}
    {{#subresourceOperation}}@Path("{{{path}}}"){{/subresourceOperation}}
{{#hasConsumes}}
    @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} })
{{/hasConsumes}}
{{#hasProduces}}
    @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} })
{{/hasProduces}}
{{#swagger1AnnotationLibrary}}
    @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
    {{#implicitHeadersParams.0}}
    @io.swagger.annotations.ApiImplicitParams({
        {{#implicitHeadersParams}}
        @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}}
        {{/implicitHeadersParams}}
    })
    {{/implicitHeadersParams.0}}
    @ApiResponses(value = { {{#responses}}
        @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{#isFile}}{{#useAbstractionForFiles}}InputStream{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{baseType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{baseType}}}{{/isFile}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} })
{{/swagger1AnnotationLibrary}}
{{#swagger2AnnotationLibrary}}
    @Operation(operationId = "{{{operationIdOriginal}}}"{{#summary}}, summary = "{{{.}}}"{{/summary}}, {{#isDeprecated}}deprecated = true, {{/isDeprecated}} tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} })
    @ApiResponses(value = { {{#responses}}
        @ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, content = @Content({{#containerType}}array = @ArraySchema({{/containerType}}schema = @Schema(implementation = {{#isFile}}{{#useAbstractionForFiles}}InputStream{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{baseType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{baseType}}}{{/isFile}}.class){{#containerType}}){{/containerType}}){{/vendorExtensions.x-java-is-response-void}}){{^-last}},{{/-last}}{{/responses}} })
    {{#implicitHeadersParams.0}}
    @Parameters({
        {{#implicitHeadersParams}}
        {{>paramDoc}}{{^-last}},{{/-last}}
        {{/implicitHeadersParams}}
    })
    {{/implicitHeadersParams.0}}
{{/swagger2AnnotationLibrary}}
    public {{>returnTypes}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}}, {{/-last}}{{/allParams}});
{{/operation}}
}
{{/operations}}
